package cn.itcast.dataobject;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import org.springframework.beans.factory.annotation.Value;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * @author: wangxg
 * @date: 2019-06-22 05:07
 **/

@ApiModel

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Entity
@Table(name = "member")
public class Member {

    @ApiModelProperty("学员ID")
    @Id
    private Long memberId;

    /**
     * required 将描述标记未必须
     */
    @ApiModelProperty(value = "手机号", required = true)
    private String mobile;

    @ApiModelProperty(value = "邮箱", required = true)
    private String email;

    @ApiModelProperty(value = "密码", required = true)
    private String password;

    @ApiModelProperty(value = "用户名")
    private String username;

    /**
     * 将不希望在文档中看到的属性使用hidden隐藏
     */
    @ApiModelProperty(value = "逻辑删除 1已删除 0未删除", hidden = true)
    @Value(value = "false")
    private Boolean deleted;
}
